package com.karolak.math.formula;

/**
 * 
 * <code>EmaInd</code> is used to ....
 * 
 * @author <a href="mailto:kwozniak@hotmail.com">Karol Wozniak</a>
 */

public class Ema {

	public static double calculate(int period, double ema, double x) {
		double k = K.calculate(period);
		double ema0 = k * x + (1 - k) * ema;
		return ema0;
	}
}
